home *** CD-ROM | disk | FTP | other *** search
- global gSize, gCast, gVariable, myCurrentImage, myCurrentPreview
-
- on toolWarp
- member("state1 - " & gSize, gCast).image = member(gSize & "x" & gSize, gCast).image
- startPoint = point((the mouseH - sprite(1).left) * 2 / gVariable / 2, (the mouseV - sprite(1).top) * 2 / gVariable / 2)
- myCurrentImage = duplicate(member(gSize & "x" & gSize, gCast).image)
- myStartImage = duplicate(myCurrentImage)
- myCurrentPreview = duplicate(member("preview", gCast).image)
- tLImage = image(startPoint.locH, startPoint.locV, member(gSize & "x" & gSize, gCast).depth, member(gSize & "x" & gSize, gCast).paletteRef)
- tLImage.copyPixels(myCurrentImage, tLImage.rect, rect(0, 0, startPoint.locH, startPoint.locV))
- tRImage = image(myCurrentImage.width - startPoint.locH, startPoint.locV, member(gSize & "x" & gSize, gCast).depth, member(gSize & "x" & gSize, gCast).paletteRef)
- tRImage.copyPixels(myCurrentImage, tRImage.rect, rect(startPoint.locH, 0, myCurrentImage.width, startPoint.locV))
- bLImage = image(startPoint.locH, myCurrentImage.height - startPoint.locV, member(gSize & "x" & gSize, gCast).depth, member(gSize & "x" & gSize, gCast).paletteRef)
- bLImage.copyPixels(myCurrentImage, bLImage.rect, rect(0, startPoint.locV, startPoint.locH, myCurrentImage.height))
- bRImage = image(myCurrentImage.width - startPoint.locH, myCurrentImage.height - startPoint.locV, member(gSize & "x" & gSize, gCast).depth, member(gSize & "x" & gSize, gCast).paletteRef)
- bRImage.copyPixels(myCurrentImage, bRImage.rect, rect(startPoint.locH, startPoint.locV, myCurrentImage.width, myCurrentImage.height))
- repeat while the mouseDown
- myCurrentImage.copyPixels(myStartImage, myStartImage.rect, myStartImage.rect)
- myCurrentImage.copyPixels(tLImage, [point(0, 0), point(startPoint.locH, 0), point((the mouseH - sprite(1).left) * 2 / gVariable / 2, (the mouseV - sprite(1).top) * 2 / gVariable / 2), point(0, startPoint.locV)], tLImage.rect)
- myCurrentImage.copyPixels(tRImage, [point(startPoint.locH, 0), point(myCurrentImage.width, 0), point(myCurrentImage.width, startPoint.locV), point((the mouseH - sprite(1).left) * 2 / gVariable / 2, (the mouseV - sprite(1).top) * 2 / gVariable / 2)], tRImage.rect)
- myCurrentImage.copyPixels(bLImage, [point(0, startPoint.locV), point((the mouseH - sprite(1).left) * 2 / gVariable / 2, (the mouseV - sprite(1).top) * 2 / gVariable / 2), point(startPoint.locH, myCurrentImage.height), point(0, myCurrentImage.height)], bLImage.rect)
- myCurrentImage.copyPixels(bRImage, [point((the mouseH - sprite(1).left) * 2 / gVariable / 2, (the mouseV - sprite(1).top) * 2 / gVariable / 2), point(myCurrentImage.width, startPoint.locV), point(myCurrentImage.width, myCurrentImage.height), point(startPoint.locH, myCurrentImage.height)], bRImage.rect)
- member(gSize & "x" & gSize, gCast).image.copyPixels(myCurrentImage, myCurrentImage.rect, myCurrentImage.rect)
- updateStage()
- put (the mouseH - sprite(1).left) * 2 / gVariable / 2 into field "location status X"
- put (the mouseV - sprite(1).top) * 2 / gVariable / 2 into field "location status Y"
- fnUpdatePreview()
- end repeat
- sprite(35).pState = 0
- sendSprite(35, #setMember)
- member("state2 - " & gSize, gCast).image = member(gSize & "x" & gSize, gCast).image
- myCurrentImage = VOID
- myStartImage = VOID
- myCurrentPreview = VOID
- tLImage = VOID
- tRImage = VOID
- bLImage = VOID
- bRImage = VOID
- put EMPTY into field "location status X"
- put EMPTY into field "location status Y"
- end
-